<?php

namespace app\common\validate\xilumarket;

use think\Validate;

/**
 * @package app\common\validate
 */
class UserAddress extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name'              => ['require','length:1,50'],
        'mobile'            => ['require','length:1,20'],
        'province_id|地区'   => ['require','integer'],
        'city_id|地区'       => ['require','integer'],
        'region_id|地区'     => ['require','integer'],
        'address|详细地址'    => ['require']
    ];
    /**
     * 提示消息
     */
    protected $message = [

    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name','mobile','province_id', 'city_id', 'region_id','address'],

        'edit' => ['name','mobile','province_id', 'city_id', 'region_id','address'],
    ];

}
